1. Field of the Invention
The present invention relates to a data processing apparatus configured to perform data processing operations by executing instructions. More particularly, this invention relates to a data processing apparatus configured to execute a load-exclusive operation and a store-exclusive operation.
2. Background
It is known to provide a data processing apparatus which is configured to execute load-exclusive operations and store-exclusive operations, the execution of these operations being linked to an exclusive use monitor provided in the data processing apparatus. Execution of the load-exclusive operation not only loads a data value from a specified memory location but also causes the exclusive use monitor to begin monitoring that specified memory location. Thereafter, a store-exclusive operation which seeks to store a data value to that memory location may only do so if the exclusive use monitor indicates that the data value loaded by the load-exclusive operation at that memory location has not been modified in the interim period. This may, for example, be of benefit in the context of a memory shared between multiple processor units, so that a given processor unit can be assured to have exclusive, un-interrupted access to a given memory location, despite that memory location also being accessible to other processor units.
It is also known to provide a processor unit in a data processing apparatus with a cache which is configured to store local copies of a subset of the data values which that processor unit accesses in a memory. Data processing operations are then carried out with respect to those local copies, rather than the original copies in memory, significantly reducing the associated access times due to the speed with which a local cache can be accessed by comparison with an external memory. Such a cache will typically be configured to manage the local copies of data values which it stores independently of the processor unit, for example by initiating the retrieval of data values from the memory for which a local copy is not currently stored when the processor unit requests that data value, by maintaining a status value for each local copy stored in the cache (e.g. marking when the local copy has been modified by the processor unit) and so on. However, in a data processing apparatus which is configured to execute load-exclusive and store-exclusive operations, which also has a local cache, the possibility arises for the mechanisms associated with execution of the load-exclusive and store-exclusive operations to conflict with the mechanisms associated with the administration of the cache. In particular, when a load-exclusive and store-exclusive pair of operations are carried out, it is desirable if the store-exclusive operation is allowed to complete as soon as possible, without being delayed by the above mentioned cache management mechanisms.
Accordingly, it would be desirable to provide an improved technique for operating a data processing apparatus configured to perform load-exclusive and store-exclusive operations when the processor unit has an associated cache configured to store local copies of data values used by the processor unit in its data processing operations.